package aom.ju.ss.view.pay

import android.app.Activity
import aom.ju.ss.R
import aom.ju.ss.databinding.ViewPaypassDialogBinding
import aom.ju.ss.view.dialog.BaseDialog

class PayPassDialog2(activity: Activity, onc: OnPayClickListener) : BaseDialog(activity) {

    init {
        setWidth(-1)

        val bin = vBinding as ViewPaypassDialogBinding
        bin.payView.setPayClickListener(object : OnPayClickListener {
            override fun onPassFinish(passContent: String, dialog2: PayPassDialog2?) {
                onc.onPassFinish(passContent,this@PayPassDialog2)
                bin.payView.cleanAllTv()
                dis()
            }

            override fun onPayForget(dialog2: PayPassDialog2?) {
                onc.onPayForget(this@PayPassDialog2)
                dis()
            }

        })
        bin.payView.mImageViewClose.setOnClickListener { dis() }
    }

    override fun isBottom(): Boolean {
        return true
    }

    override fun getLay(): Int {
        return R.layout.view_paypass_dialog
    }
}

interface OnPayClickListener {
    fun onPassFinish(passContent: String,dialog2: PayPassDialog2?)
    fun onPayForget(dialog2: PayPassDialog2?)


}